Function reference previous pagenext page

1.4: uiextras.TabPanel Go back up one level


Arrange elements in a panel with tabs for selecting which is visible

obj = uiextras.TabPanel( )
creates a panel with tabs along one edge to allow selection between the different child objects contained.
obj = uiextras.TabPanel( prop, value, ... )
also sets one or more property values.

uiextras.TabPanel properties

PropertyValueDescription
BackgroundColor colorspecThe color to use for exposed areas of the layout background. This can be an RGB triple (e.g. [0 0 1]) or a colour name (e.g. 'b').
BeingDeleted [ on | off ]is the object in the process of being deleted.
Callback function_handleFunction to call when the selected tab is changed. The event-data supplied has fields PreviousChild and SelectedChild giving the previously selected and newly selected tab indices.
Children handle arrayList of child objects within this layout (note that this can only be set to permutations of itself).
DeleteFcn function_handleFunction to call when the layout is being deleted
Enable [ on | off ]Is interaction with this layout enabled? Note that changing the enable property will cause all children contained to also be enabled/disabled, however since they can be individually re-enabled the state of this property does not reflect the state of the children. See the enable example for more details.
FontAngle [ normal | italic | oblique ]Title font angle.
FontName stringTitle font name (e.g. Arial, Helvetica etc).
FontSize positive integerTitle font size.
FontUnits [ inches | centimeters | normalized | points | pixels ]Title font units for measuring size.
FontWeight [ light | normal | demi | bold ]Title font weight.
ForegroundColor colorspecTitle font color and/or color of 2-D border line.
HighlightColor colorspec3-D frame highlight color.
ShadowColor colorspec3-D frame shadow color.
IsMinimized logicalIs this panel in a minimized state.
MinimizeFcn function handleFunction to call when panel is minimized or maximized.
Padding positive integerNumber of pixels of extra space around the outside of the layout.
Parent handleThe handle of the parent figure or container.
Position [x y w h]The position (x,y) and size (w,h) of the layout.
SelectedChild positive integer or emptyWhich child is visible.
TabSize positive integerSize (width) of the tabs in pixels (default 50).
TabEnable cell array of [ on | off ]A list of the enabled state of each tab (default is all 'on').
TabNames cell array of stringsA list of the names of the tabs with one entry per tab.
Tag stringA string that can be used to identify this object later.
Type stringthe object type (class).
Units [ inches | centimeters | normalized | points | pixels | characters ]The units of measurement for position the layout within its parent.
Visible [ on | off ]Is the object visible on screen.

For example:

f = figure();
p = uiextras.TabPanel( 'Parent', f, 'Padding', 5 );
uicontrol( 'Parent', p, 'Background', 'r' );
uicontrol( 'Parent', p, 'Background', 'b' );
uicontrol( 'Parent', p, 'Background', 'g' );
p.TabNames = {'Red', 'Blue', 'Green'};
p.SelectedChild = 2;


See also:
© 2011 The MathWorks Ltd Terms of Use Patents Trademarks